
import WxParse from '../../components/wxParse/wxParse'

Page({
  data: {
    articles: {},
  },
  onLoad(options) {
    const _this = this
    wx.request({
      url: `http://localhost:3000/articles/${options.id}`,
      success(res) {
        _this.setData({
          articles: res.data
        })

        // var article = '<div>我是HTML代码</div>';
        var article = _this.data.articles.details;
        WxParse.wxParse('article', 'html', article, _this, 5);
      }
    })
  }
})